{% extends 'airshow/base.html' %}

{% block title %}展区列表 - 珠海航展数据管理系统{% endblock %}

{% block content %}
<div class="d-flex justify-content-between align-items-center mb-4">
    <h2>展区列表</h2>
</div>

<div class="row">
    {% if areas_with_exhibitors %}
        {% for area in areas_with_exhibitors %}
            <div class="col-md-4 mb-4">
                <div class="card h-100">
                    <div class="card-header">
                        {{ area.name }}
                    </div>
                    <div class="card-body">
                        <p>
                            <strong>位置：</strong> {{ area.location|default:"未设置" }}
                        </p>
                        <p>
                            <strong>参展商数量：</strong> {{ area.exhibitor_count }}
                        </p>
                    </div>
                    <div class="card-footer text-center">
                        <a href="{% url 'airshow:area_detail' area.area_id %}" class="btn btn-info">查看详情</a>
                    </div>
                </div>
            </div>
        {% endfor %}
    {% else %}
        <div class="col-12">
            <div class="alert alert-info text-center">
                暂无展区数据
            </div>
        </div>
    {% endif %}
</div>
{% endblock %} 